3.184 \(\int \frac{\cot (c+d x)}{(a+b \sin (c+d x))^2} \, dx\)

Optimal. Leaf size=53 \[ -\frac{\log (a+b \sin (c+d x))}{a^2 d}+\frac{\log (\sin (c+d x))}{a^2 d}+\frac{1}{a d (a+b \sin (c+d x))} \]

[Out]

Log[Sin[c + d*x]]/(a^2*d) - Log[a + b*Sin[c + d*x]]/(a^2*d) + 1/(a*d*(a + b*Sin[c + d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.0526635, antiderivative size = 53, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.105, Rules used = {2721, 44} \[ -\frac{\log (a+b \sin (c+d x))}{a^2 d}+\frac{\log (\sin (c+d x))}{a^2 d}+\frac{1}{a d (a+b \sin (c+d x))} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]/(a + b*Sin[c + d*x])^2,x]

[Out]

Log[Sin[c + d*x]]/(a^2*d) - Log[a + b*Sin[c + d*x]]/(a^2*d) + 1/(a*d*(a + b*Sin[c + d*x]))

Rule 2721

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*tan[(e_.) + (f_.)*(x_)]^(p_.), x_Symbol] :> Dist[1/f, Subst[I
nt[(x^p*(a + x)^m)/(b^2 - x^2)^((p + 1)/2), x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, e, f, m}, x] && NeQ[a^2
 - b^2, 0] && IntegerQ[(p + 1)/2]

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rubi steps

\begin{align*} \int \frac{\cot (c+d x)}{(a+b \sin (c+d x))^2} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{1}{x (a+x)^2} \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{1}{a^2 x}-\frac{1}{a (a+x)^2}-\frac{1}{a^2 (a+x)}\right ) \, dx,x,b \sin (c+d x)\right )}{d}\\ &=\frac{\log (\sin (c+d x))}{a^2 d}-\frac{\log (a+b \sin (c+d x))}{a^2 d}+\frac{1}{a d (a+b \sin (c+d x))}\\ \end{align*}

Mathematica [A]  time = 0.0760863, size = 42, normalized size = 0.79 \[ \frac{\frac{a}{a+b \sin (c+d x)}-\log (a+b \sin (c+d x))+\log (\sin (c+d x))}{a^2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]/(a + b*Sin[c + d*x])^2,x]

[Out]

(Log[Sin[c + d*x]] - Log[a + b*Sin[c + d*x]] + a/(a + b*Sin[c + d*x]))/(a^2*d)

________________________________________________________________________________________

Maple [A]  time = 0.038, size = 54, normalized size = 1. \begin{align*}{\frac{\ln \left ( \sin \left ( dx+c \right ) \right ) }{{a}^{2}d}}-{\frac{\ln \left ( a+b\sin \left ( dx+c \right ) \right ) }{{a}^{2}d}}+{\frac{1}{da \left ( a+b\sin \left ( dx+c \right ) \right ) }} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cot(d*x+c)/(a+b*sin(d*x+c))^2,x)

[Out]

ln(sin(d*x+c))/a^2/d-ln(a+b*sin(d*x+c))/a^2/d+1/a/d/(a+b*sin(d*x+c))

________________________________________________________________________________________

Maxima [A]  time = 1.47039, size = 63, normalized size = 1.19 \begin{align*} \frac{\frac{1}{a b \sin \left (d x + c\right ) + a^{2}} - \frac{\log \left (b \sin \left (d x + c\right ) + a\right )}{a^{2}} + \frac{\log \left (\sin \left (d x + c\right )\right )}{a^{2}}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+b*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

(1/(a*b*sin(d*x + c) + a^2) - log(b*sin(d*x + c) + a)/a^2 + log(sin(d*x + c))/a^2)/d

________________________________________________________________________________________

Fricas [A]  time = 1.63667, size = 176, normalized size = 3.32 \begin{align*} -\frac{{\left (b \sin \left (d x + c\right ) + a\right )} \log \left (b \sin \left (d x + c\right ) + a\right ) -{\left (b \sin \left (d x + c\right ) + a\right )} \log \left (-\frac{1}{2} \, \sin \left (d x + c\right )\right ) - a}{a^{2} b d \sin \left (d x + c\right ) + a^{3} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+b*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

-((b*sin(d*x + c) + a)*log(b*sin(d*x + c) + a) - (b*sin(d*x + c) + a)*log(-1/2*sin(d*x + c)) - a)/(a^2*b*d*sin
(d*x + c) + a^3*d)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cot{\left (c + d x \right )}}{\left (a + b \sin{\left (c + d x \right )}\right )^{2}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+b*sin(d*x+c))**2,x)

[Out]

Integral(cot(c + d*x)/(a + b*sin(c + d*x))**2, x)

________________________________________________________________________________________

Giac [A]  time = 1.49888, size = 69, normalized size = 1.3 \begin{align*} \frac{b{\left (\frac{\log \left ({\left | -\frac{a}{b \sin \left (d x + c\right ) + a} + 1 \right |}\right )}{a^{2} b} + \frac{1}{{\left (b \sin \left (d x + c\right ) + a\right )} a b}\right )}}{d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cot(d*x+c)/(a+b*sin(d*x+c))^2,x, algorithm="giac")

[Out]

b*(log(abs(-a/(b*sin(d*x + c) + a) + 1))/(a^2*b) + 1/((b*sin(d*x + c) + a)*a*b))/d